#include<iostream>
#include<string>

using namespace std;

int main(){
    string s;
    string result;
    int mymax;
    cin>>s;
    mymax=s.size();
    result=s;
    getchar();
    while(s[s.size()-1]!='.'){
        cin>>s;
        getchar();
        if(s.find('.')==string::npos){
            if(mymax<s.size()){
                mymax=s.size();
                result=s;
            }
        }else{
            if(mymax<s.erase(s.size()-1,1).size()){
                result=s;
            }
            break;
        }
    }
    if(s.find('.')==string::npos){
        cout<<result;
        return 0;
    }

    cout<<result.erase(result.size()-1,1);

    return 0;
}
